package com.baidumap.administrator.happystudy.module.fenlei.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/18 16:14
 * 邮箱：2235445233@qq.com
 */
public class M_Childcat {

    /**
     * error : 0
     * content : [{"cat_id":"1","cat_name":"食品、酒类、生鲜、特产","keywords":"","cat_desc":"","grade":"5","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"11"},{"cat_id":"2","cat_name":"男装、女装、内衣、珠宝","keywords":"","cat_desc":"","grade":"5","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"5"},{"cat_id":"3","cat_name":"个护化妆、清洁用品","keywords":"","cat_desc":"","grade":"5","filter_attr":"38,39","parent_id":"0","is_show":"1","sort_order":"6"},{"cat_id":"4","cat_name":"手机、数码、通信","keywords":"","cat_desc":"","grade":"8","filter_attr":"1,3,2,9,14","parent_id":"0","is_show":"1","sort_order":"2"},{"cat_id":"5","cat_name":"家用电器","keywords":"","cat_desc":"","grade":"10","filter_attr":"38,39","parent_id":"0","is_show":"1","sort_order":"1"},{"cat_id":"6","cat_name":"家居、家具、家装、厨具","keywords":"","cat_desc":"","grade":"5","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"4"},{"cat_id":"7","cat_name":"酒类饮料","keywords":"","cat_desc":"","grade":"5","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"7"},{"cat_id":"8","cat_name":"母婴、玩具乐器","keywords":"","cat_desc":"","grade":"5","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"10"},{"cat_id":"356","cat_name":"虚拟商品","keywords":"","cat_desc":"","grade":"0","filter_attr":"0","parent_id":"0","is_show":"1","sort_order":"50"},{"cat_id":"358","cat_name":"电脑、办公","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"3"},{"cat_id":"359","cat_name":"鞋靴、箱包、钟表、奢侈品","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"7"},{"cat_id":"360","cat_name":"运动户外","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"8"},{"cat_id":"361","cat_name":"汽车、汽车用品","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"9"},{"cat_id":"362","cat_name":"营养保健","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"12"},{"cat_id":"363","cat_name":"图书、音像、电子书","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"13"},{"cat_id":"364","cat_name":"彩票、旅行、充值、票务","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"14"},{"cat_id":"365","cat_name":"理财、众筹、白条、保险","keywords":"","cat_desc":"","grade":"0","filter_attr":"","parent_id":"0","is_show":"1","sort_order":"15"}]
     */

    private int error;
    /**
     * cat_id : 1
     * cat_name : 食品、酒类、生鲜、特产
     * keywords :
     * cat_desc :
     * grade : 5
     * filter_attr :
     * parent_id : 0
     * is_show : 1
     * sort_order : 11
     */

    private List<ContentBean> content;

    public int getError() {
        return error;
    }

    public void setError(int error) {
        this.error = error;
    }

    public List<ContentBean> getContent() {
        return content;
    }

    public void setContent(List<ContentBean> content) {
        this.content = content;
    }

    public static class ContentBean {
        private String cat_id;
        private String cat_name;
        private String keywords;
        private String cat_desc;
        private String grade;
        private String filter_attr;
        private String parent_id;
        private String is_show;
        private String sort_order;
        private String type_img;

        public String getCat_id() {
            return cat_id;
        }

        public void setCat_id(String cat_id) {
            this.cat_id = cat_id;
        }

        public String getCat_name() {
            return cat_name;
        }

        public void setCat_name(String cat_name) {
            this.cat_name = cat_name;
        }

        public String getKeywords() {
            return keywords;
        }

        public void setKeywords(String keywords) {
            this.keywords = keywords;
        }

        public String getCat_desc() {
            return cat_desc;
        }

        public void setCat_desc(String cat_desc) {
            this.cat_desc = cat_desc;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getFilter_attr() {
            return filter_attr;
        }

        public void setFilter_attr(String filter_attr) {
            this.filter_attr = filter_attr;
        }

        public String getParent_id() {
            return parent_id;
        }

        public void setParent_id(String parent_id) {
            this.parent_id = parent_id;
        }

        public String getIs_show() {
            return is_show;
        }

        public void setIs_show(String is_show) {
            this.is_show = is_show;
        }

        public String getSort_order() {
            return sort_order;
        }

        public void setSort_order(String sort_order) {
            this.sort_order = sort_order;
        }

        public String getType_img() {
            return type_img;
        }

        public void setType_img(String type_img) {
            this.type_img = type_img;
        }
    }

    /**
     * 用json构造自己
     *
     * @param json
     */
    public M_Childcat(String json) {
        super();
        M_Childcat result = AbJsonUtil.fromJson(json, this.getClass());
        this.error = result.getError();
        this.content = result.getContent();
    }
}
